import { Rule, RuleType } from "@midwayjs/validate";
import { PageDTO } from "@dto/common/page.dto";

// 查询参数
export class ListGenTableDTO extends PageDTO {
  @Rule(RuleType.string())
  tableName?: string;

  @Rule(RuleType.string())
  tableComment?: string;

  @Rule(RuleType.string())
  'params[beginTime]'?: string;

  @Rule(RuleType.string())
  'params[endTime]'?: string;
}

// 新增参数
export class CreateGenTableDTO {
  @Rule(RuleType.string())
  tableName?: string;
}

// 修改参数
export class UpdateGenTableDTO extends CreateGenTableDTO{
  @Rule(RuleType.number().required())
  tableId: number;
}
